package util;

import java.util.Collection;
import java.util.Iterator;

public class Util {
	public static void sleep(int millis) {
		try {
			Thread.sleep(millis);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static double[] toArray(Collection<Double> vec) {
		double[] arr = new double[vec.size()];
		Iterator<Double> iter = vec.iterator();
		for (int i = 0; iter.hasNext(); i++)
			arr[i] = iter.next();
		return arr;
	}
}
